/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* 游戏容器 */
.game-container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

/* 标题样式 */
h1 {
    color: #333;
    margin-bottom: 20px;
}

/* 游戏信息区域 */
.game-info {
    margin-bottom: 20px;
}

/* 得分显示 */
.score {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #555;
}

/* 控制按钮 */
.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.controls button {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.controls button:hover {
    background-color: #45a049;
}

.controls button:active {
    background-color: #3e8e41;
}

/* 游戏画布 */
#gameCanvas {
    border: 2px solid #333;
    background-color: #fafafa;
    display: block;
    margin: 0 auto;
    margin-bottom: 20px;
}

/* 游戏说明 */
.instructions {
    text-align: left;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.instructions h3 {
    margin-bottom: 10px;
    color: #333;
}

.instructions p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 500px) {
    .game-container {
        padding: 15px;
        margin: 10px;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
    
    .controls {
        flex-wrap: wrap;
    }
}